home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / datacomm / vltjr-5.045.lzh / rexx / SendASCII.vlt < prev    next >
Text File  |  1990-08-12  |  983b  |  56 lines

  1. /** SendASCII.vlt
  2. *
  3. *   VLT ASCII send test.
  4. *
  5. **/
  6. /*
  7. *   Get last file sent
  8. */
  9. filename = getenv(vltasciifilnam)
  10. dirname  = ""
  11. /*
  12. *   Break up into file and dir
  13. */
  14. nf = lastpos("/", filename)
  15.  
  16. if nf = 0 then do
  17.    nf = lastpos(":", filename)
  18.    if nf ~= 0 then do
  19.       dirname = substr(filename, 1, nf)
  20.       filename = substr(filename, nf + 1)
  21.    end
  22. end
  23. else do
  24.    dirname = substr(filename, 1, nf - 1)
  25.    filename = substr(filename, nf + 1)
  26. end
  27. /*
  28. *   Ask for file
  29. */
  30. filename = GetFile(50,50,dirname,filename,"Enter File Name",VLT)
  31. if filename = "" then exit
  32. /*
  33. *   Save filename to env var.
  34. */
  35. call setenv(vltasciifilnam, filename)
  36.  
  37. /*
  38. *   Find out the current settings
  39. */
  40. 'extract transferprotocol'
  41. 'extract currentxpr'
  42. /*
  43. *   Select current transfer protocol
  44. */
  45. 'xpr select xprascii.library'
  46. 'transfer protocol external'
  47. 'xpr init 50'
  48. 'file send 'filename
  49. /*
  50. *   Set protocol back to previous
  51. */
  52. 'xpr select 'VLT.currentxpr
  53. 'transfer protocol 'VLT.transferprotocol
  54. exit
  55.    
  56.